<h1>Улирал</h1>

<?php echo link_to('жагсаалт', 'season/index', array('class'=>'title'))?> 
<span class="separator"> | </span>
<?php echo link_to('шинээр нэмэх', 'season/new', array('class'=>'title'))?>
<br clear="all">
<br clear="all">

<table width="100%">
  <thead>
    <tr>
      <th>#</th>
      <th>Лиг</th>
      <th>Улирал</th>
      <th>Тухай</th>
      <th>Үе</th>
      <th>Published</th>
      <th>Хожилийн оноо</th>
      <th>Хожигдолын оноо</th>      
      <th>Багууд</th>      
      <th>#</th>      
    </tr>
  </thead>
  <tbody>
    <?php $i=0; foreach ($bb_seasons as $bb_season): ?>
    <tr>
      <td><?php $i++ ?></td>
      <td><?php echo $bb_season->getBbLeague() ?></td>
      <td><?php echo $bb_season->getSName() ?></td>
      <td><?php echo $bb_season->getSDescr() ?></td>
      <td><?php echo $bb_season->getSRounds() ?></td>
      <td><?php echo $bb_season->getPublished() ?></td>
      <td><?php echo $bb_season->getSWinPoint() ?></td>
      <td><?php echo $bb_season->getSLostPoint() ?></td>      
      <td>
          <?php $sts = Doctrine::getTable('BbSeasonTeams')->findBySeasonId($bb_season->getSId()); ?>
          <?php foreach ($sts as $st): ?>
              <label style="font-weight:normal;text-align:left;text-decoration:underline;"><?php echo $st->getBbTeams()?></label>
          <?php endforeach ?>
      </td>      
      <td nowrap>
        <a href="<?php echo url_for('season/edit?s_id='.$bb_season->getSId().'#teams') ?>">Багууд нэмэх / хасах</a><br><br>
        <a href="<?php echo url_for('season/edit?s_id='.$bb_season->getSId()) ?>">Засварлах</a><br><br>
        <a onclick="return confirm('Та итгэлтэй байна уу?')" href="<?php echo url_for('season/delete?id='.$bb_season->getSId()) ?>">Устгах</a>
      </td>  
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

